<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>07.classs的继承.html</title>
</head>

<body>
    <script>
        class Person {
            constructor(name, age, address) {
                this.name = name;
                this.age = age;
                this.address = address;
            }
            say() {
                console.log(this.name + "在说话....");
            }
        }

        class Student extends Person {
            constructor(name, age, address, score) {
                super(name, age, address)
                this.score = score;
            }
        }

        const stu01 = new Student("小明", 18, "南京市", 100)
        console.log(stu01);
        stu01.say()
    </script>

</body>

</html>